define(["../../../../../js/lib/other/sweet-alert"],function() {
    return ['$scope','$location', '$interval','$timeout','bizProxy', function($scope,$location,$interval,$timeout,bizProxy) {
		$scope.$emit("top-show",'true');//顶部显示
    	$scope.$emit('menuTypeLight','mine'); 	//控制底部menu高亮
    	$scope.$emit('bub-menu','true'); 	//隐藏底部menu
    	$scope.$emit('flag-tag','18');//显示底部文字
    	
    	
    	//点击前去登录
    	$scope.goLogin = function(){
    		userLogout();
    	}
    	
    	//退出登录
    	function userLogout(){
    		var headerInfo = {},bizInfo = {};
        	headerInfo.pageNum = '';
        	headerInfo.pageSize = '';
        	headerInfo.sessionId = transData.sessionId;
    		
        	bizInfo.mobileNo = transData.mobileNo;
    		$scope.$emit("loadingChange",true);
    		bizProxy.queryProxyBizData("userLogout",headerInfo,bizInfo,
    				function(tempData){//SUCCESS
    					$scope.$emit("loadingChange",false);
		    			transData.password = "";
						transData.sessionId = "";
						transData.userType = "";
						resultData.loginUserData = "";
						$timeout(function(){
							$scope.$emit("goNext","/login");
						},0);
		    		},function(data){//FAIL
		    			$scope.$emit("loadingChange",false);
		    			$scope.$emit("promptAlertMsg","连接超时");
		    			$scope.$emit("showCollect",true);
		    			$timeout(function(){
		    				$scope.$emit("showCollect",false);
		    			},transData.promptTime);
		    		});
    	}
        $scope.$apply();
    }];
});